function rois=roi_mat2lin(matrix)
% rois=roi_mat2lin(matrix)
%
% Converts a MAXISERIES Nx256x256 ROI matrix to a cell structure of ROI vectors.
%
% See also: roi_lin2mat
%
% 2012 Ari-Pekka Honkanen

for ii = 1:size(matrix,1)
	rois{ii}=find(logical(matrix(ii,:,:)));
end

end